package com.jyw.business.ast.wechat.controller;

import com.jyw.business.ast.domain.dto.web.AstConsumableEditDto;
import com.jyw.business.ast.domain.dto.web.AstConsumablePageDto;
import com.jyw.business.ast.domain.dto.web.AstConsumableReverseDto;
import com.jyw.business.ast.domain.dto.web.AstConsumableSignDto;
import com.jyw.business.ast.domain.vo.web.AstConsumableDetailVo;
import com.jyw.business.ast.domain.vo.web.AstConsumablePageVo;
import com.jyw.business.ast.service.IAstConsumableService;
import com.jyw.common.annotation.Log;
import com.jyw.common.core.controller.BaseController;
import com.jyw.common.core.domain.CommonResult;
import com.jyw.common.core.page.BasePage;
import com.jyw.common.core.page.TableDataInfo;
import com.jyw.common.enums.BusinessType;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;
import java.util.List;

/**
 * 资产-耗材信息Controller
 * 
 * @author system
 * @date 2023-10-24
 */
@RestController
@RequestMapping("wechat/ast/consumable")
@Api(tags = "耗材管理")
public class WechatAstConsumableController extends BaseController
{
    @Autowired
    private IAstConsumableService astConsumableService;

    /**
     * 查询资产-耗材信息列表
     */
    @PreAuthorize("@ss.hasPermi('ast:consumable:list')")
    @PostMapping("/list")
    @ApiOperation("分页查询")
    public TableDataInfo<AstConsumablePageVo> list(BasePage page, @RequestBody AstConsumablePageDto dto)
    {
        startPage();
        List<AstConsumablePageVo> list = astConsumableService.consumablePage(dto);
        return getDataTable(list);
    }
}
